package cn.zjitc.exam.mapper;

import cn.zjitc.exam.domain.Product;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ProductMapper {
    Product findById(int id);
    int insert(Product product);
    int update(Product product);
    int delete(int id);
    int getProductCount();
    List<Product> getProductByPage(@Param("offset") int page,@Param("PageSize") int pageSize);
    List<Product> searchByKeyword(@Param("keyword") String keyword,
                                  @Param("offset") int offset,
                                  @Param("pageSize") int pageSize);
    int countByKeyword(@Param("keyword") String keyword);
}
